import http from './http.js'
export default{
  add(goodsAttrId, goodsNumber, userId, callback,flavorName){
    if (!userId){
      return;
    }
    http.request({
      url:'cart/add',
      loadTip:'正在请求',
      data:{
        goodsAttrId: goodsAttrId,
        goodsNumber: goodsNumber,
        userId: userId,
        flavorName: !flavorName ? "" : flavorName
      },
      success:res=>{
        callback && callback(res)
      }
    });
  }
}